<!DOCTYPE html>
<html>
<body>

<canvas id="myCanvas" width="300" height="150" style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>

	<script>
		function draw(line, color, x, y, width, height){
			var c=document.getElementById("myCanvas");
			var ctx=c.getContext("2d");
		
			// Red rectangle
			ctx.beginPath();
			ctx.lineWidth=line;
			ctx.strokeStyle=color;
			ctx.rect(x, y, width, height);  
			ctx.stroke();
			
			ctx.fillStyle = "red";
			ctx.font = "20pt sans-serif";
			ctx.fillText("Canvas Rocks!", 5, 100);
			ctx.strokeText("Canvas Rocks!", 5, 130);			
		} // end draw
		
		draw(4, "green", 30,30,50,50);
	</script>




</body>
</html>
